'use strict';

const { validatorPhone } = require('../common/index');

module.exports = {
  userName: [
    { type: 'string', message: '姓必须为字符串' },
    { min: 0, max: 20, message: '姓长度最大20字' },
  ],
  secondName: [
    { type: 'string', message: '名必须为字符串' },
    { min: 0, max: 20, message: '名长度最大20字' },
  ],
  description: [
    { type: 'string', message: '描述必须为字符串' },
    { min: 0, max: 1000, message: '描述长度最大1000字' },
  ],
  address: [
    { type: 'string', message: '名必须为字符串' },
    { min: 0, max: 20, message: '名长度最大20字' },
  ],
  areaId: [
    { type: 'number', message: '地区id必须是数字' },
  ],
  phoneNum: [
    { validator: validatorPhone() },
  ],
};
